home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / biz / swood / FW_Font.lha / FW_Font / FontLook-Auto.fwrexx < prev    next >
Text File  |  1997-08-07  |  6KB  |  216 lines

  1. /* Optimized with RexxOpt 1.7 */
  2.  
  3. Address='FinalW'
  4. Options results
  5. STATUS PORTNAME
  6. FW=result
  7. address=FW
  8. SIGNAL ON BREAK_C
  9. 'ShowMessage 2 0 "FontLook - Auto V2.80 - 06.08.97" "    Neu: Das Shareware-Paket" "Info im FontLook-Auto-Guide" ":-)" "Ok" "(-:"'
  10. 'ShowMessage 1 1 "A C H T U N G !" "Das Makro benötigt ein leeres Dokument." "Ihr jetziges Dokument wird gelöscht!" "Ja" "Abbruch" ""'
  11. if result=2 then call BREAK_C
  12. Cleardoc Force
  13. 'ShowMessage 2 0 "Codes oder Layout" "" "" "Codes" "Layout" ""'
  14. cl=result
  15. 'ShowMessage 2 0 "Wie soll die" "Bilschirmausgabe erfolgen?" "" "Normal" "Speed" ""'
  16. ba=result
  17. Temp="ram:fonts.info"
  18. if ~show('L',"rexxreqtools.library") then;do
  19. if ~addlib('rexxreqtools.library',0,-30,0) then;do
  20. 'ShowMessage 1 1 "Fehler...." "Benötige RexxReqTools.library" " A B B R U C H ! !" "Okay" "" ""'
  21. exit
  22. end
  23. end
  24. dir=rtfilerequest("FWFonts/SWOLFonts/",,"Verzeichnis auswählen...",,"rt_pubscrname=FinalWriterPubScreen rtfi_flags = freqf_nofiles")
  25. if dir="" then;do
  26. 'ShowMessage 1 1 "Kein Verzeichnis ausgewählt!" "   A B B R U C H ! !" "" "Okay" "" ""'
  27. exit
  28. end
  29. dir=d2c(34)||dir||d2c(34)
  30. address command 'list ' dir||' to=' Temp||' files lformat "%s%s"'
  31. If OPEN('file',Temp,"R") then
  32. If Seek("file",0,"E")=0 then;do
  33. 'ShowMessage 1 1 "Verzeichnis ist leer" " A B B R U C H ! !" "" "Okay" "" ""'
  34. address "REXX"
  35. close("file")
  36. EXIT
  37. end
  38. address "REXX"
  39. close("file")
  40. address command 'sort ' Temp Temp
  41. OPEN('file',Temp,"R")
  42. address(FW)
  43. 'ShowMessage 1 0 "Benötigen Sie Locher-Marken?" "" "" "Ja" "Nein" ""'
  44. lm=result
  45. 'ShowMessage 1 0 "Wie geht es weiter?" "" "" "Speichern" "Speichern & Drucken" "Drucken"'
  46. wgw=result
  47. IF ba=2 THEN;DO
  48. status WINDOW
  49. parse VAR result links oben breite hoehe minbreite minhoehe .
  50. sizewindow minbreite minhoehe
  51. End
  52. DO WHILE 1
  53. FullFontName=ReadLn('file')
  54. IF EOF('file') THEN;do
  55. address "REXX"
  56. close('file')
  57. call Ende
  58. End
  59. If (Lastpos(".info",FullFontName)=0&Lastpos(".otag",FullFontName)=0&Lastpos(".type",FullFontName)=0&Lastpos(".afm",FullFontName)=0&Lastpos(".lib",FullFontName)=0) then;do
  60. GetDocItemPrefs Decimal
  61. Punkt=Result
  62. If Punkt="Comma" then DocItemPrefs Decimal Period
  63. TextTool
  64. Font FullFontName
  65. a=RC
  66. If a=0 then;do
  67. Type d2c(32)
  68. BackSpace
  69. status FontPath
  70. FullFontName=result
  71. pos=max(index(FullFontName,':'),lastpos('/',FullFontName))
  72. IF (pos~=0) THEN ShortFontName=RIGHT(FullFontName,LENGTH(FullFontName)-pos)
  73. else ShortFontName=FullFontName
  74. IF ba=2 THEN View 20
  75. Pagesetup Pagetype A4 Orient Tall Pages RightOnly Top 0 Bottom 2.54 Left 0 Right 0
  76. SectionSetup Top 2.54 Bottom 2.54 Inside 2 Outside 1
  77. GraphicTool
  78. LinePrefs LineWt .5
  79. DrawLine 1 2 3.5 20 3.5
  80. DrawLine 1 2 26 20 26
  81. If lm=1 then DrawLine 1 .5 14.85 1 14.85
  82. TextTool
  83. If cl=1 then;do
  84. Do i=0 to 13
  85. SetTab i*1.3+0.8 Right
  86. End
  87. NameFont="FWDocs/Codes-"||ShortFontName
  88. Justify Center
  89. Font Softsans
  90. FontSize 18
  91. Type ShortFontName;NewParagraph;NewParagraph
  92. DO a=33 BY 14 FOR 16
  93. Font Softsans
  94. FontSize 8
  95. zeile=""
  96. DO x=a TO a+13 WHILE x<256
  97. zeile=zeile|| d2c(9)||x|| d2c(32)|| d2c(x)
  98. END
  99. If x=256 then zeile=zeile|| d2c(9)
  100. Type zeile;NewParagraph
  101. Font FullFontName
  102. FontSize 24
  103. zeile=""
  104. DO x=a TO a+13 WHILE x<256
  105. zeile=zeile|| d2c(9)|| d2c(x)
  106. END
  107. If x=256 then zeile=zeile|| d2c(9)
  108. Type zeile;NewParagraph
  109. END
  110. FontSize 12
  111. Type d2c(9);NewParagraph
  112. Font Softsans
  113. FontSize 8
  114. Justify Right
  115. Type Date(E)" - "FullFontName
  116. END
  117. If cl=2 then;do
  118. Justify Center
  119. NameFont="FWDocs/Layout-"||ShortFontName
  120. Font Softsans
  121. FontSize 18
  122. Type ShortFontName;NewParagraph
  123. Justify Left
  124. Font FullFontName
  125. FontSize 8
  126. NewParagraph;Type "This is 8-point type - not easy to read!";NewParagraph
  127. FontSize 9
  128. Type "9-Point type is about the smallest readable size.";NewParagraph
  129. FontSize 10
  130. Type "With 10-point type, we have a normal text size.";NewParagraph
  131. FontSize 12
  132. Type "With some Fonts, 12-point type is easier to read.";NewParagraph
  133. FontSize 14
  134. Type "14-point type is good for subheadings.";NewParagraph
  135. FontSize 16
  136. Type "For larger subheadings, try 16-point type.";NewParagraph
  137. FontSize 18
  138. Type "18-point type makes nice small headlines.";NewParagraph
  139. FontSize 24
  140. Type "24-point type is for medium headlines.";NewParagraph
  141. FontSize 36
  142. Type "36-point is for larger ones.";NewParagraph
  143. FontSize 48
  144. Type "48-point almost shouts!";NewParagraph
  145. FontSize 60
  146. Type "60-point is huge!";NewParagraph
  147. FontSize 12
  148. Font SoftSans
  149. Type d2c(32);NewParagraph
  150. NewParagraph;Type "NORMAL";NewParagraph
  151. FontSize 10
  152. Font FullFontName
  153. Type "ABCDEFGHIJKLMNOPQRSTUVWXYZ";NewParagraph
  154. Type "abcdefghijklmnopqrstuvwxyz 1234567890 !@#$%^&*()-+=[]{}/:;,.?";NewParagraph
  155. Type "The quick brown fox jumps over the lazy dog. ÄÖÜäöüß";NewParagraph;NewParagraph;NewParagraph
  156. FontSize 12
  157. Font SoftSans
  158. Type "ERWEITERTER SCHRIFTCODE";NewParagraph
  159. FontSize 10
  160. Font FullFontName
  161. DO j=128 BY 32 FOR 4
  162. Type XRange( d2c(j), d2c(j+31));NewParagraph
  163. End
  164. Status BodyTextHeight
  165. th=result
  166. FG=26.24-2.113-th
  167. FG=Trunc(FG*8/0.34)
  168. FontSize FG
  169. Type d2c(9)
  170. Font SoftSans
  171. FontSize 8
  172. NewParagraph
  173. Justify Right
  174. Type Date(E)" - "FullFontName
  175. End
  176. Call VH
  177. If wgw~=3 then
  178. Save NameFont
  179. If wgw=2 then
  180. Print
  181. If wgw=3 then
  182. Print
  183. Cleardoc force
  184. END
  185. else;do
  186. Call VH
  187. 'ShowMessage 1 1 "FW kann diesen Font nicht anzeigen..." "Es ist kein FW typischer Font..." "" "Okay" "" ""'
  188. end
  189. end
  190. END
  191. Ende:
  192. Address(FW)
  193. Call VH
  194. If cl=1 then 'ShowMessage 2 1 "Die Dokumente sind im FWDocs-Drawer" "zu finden. Erkennbar am «Codes-.....«" "Vielen Dank für die Benutzung." "@-`-" "Bitte" ":-))"'
  195. If cl=2 then 'ShowMessage 2 1 "Die Dokumente sind im FWDocs-Drawer" "zu finden. Erkennbar am «Layout-.....«" "Vielen Dank für die Benutzung." "@-`-" "Bitte" ":-))"'
  196. 'ShowMessage 2 1 "© Heiko Schröder" "email: age@thepentagon.com" "http://yi.com/home/SchroederHeiko" "Oki" "Doki" ":-))"'
  197. Call SH
  198. Address command "delete ram:fonts.info QUIET"
  199. EXIT
  200. BREAK_C:
  201. Call VH
  202. 'ShowMessage 1 1 "Makro-Abbruch..." "" "" "Ich weiß..." "" ""'
  203. Call SH
  204. address "REXX"
  205. CLOSE("file")
  206. Address command "delete ram:fonts.info QUIET"
  207. EXIT
  208. VH:
  209. If ba=2 then View
  210. Return
  211. SH:
  212. If ba=2 then;do
  213. SizeWindow breite hoehe
  214. If Punkt="Comma" then DocItemPrefs DECIMAL Comma
  215. end
  216. Return